#!/bin/bash
FIFONAME=myfifo.$$
rm -f $FIFONAME
mkfifo $FIFONAME
java AutoHome > $FIFONAME &
MYPROGRAM_PID=$!
#cat $FIFONAME | tee ./logfile
echo $MYPROGRAM_PID > ./pid